home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 14 / CU Amiga Magazine's Super CD-ROM 14 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-09].iso / CUCD / Programming / Blitz2 / BlitzFaq / FaqLists / ArexxSDuper.txt < prev    next >
Encoding:
Text File  |  1996-09-05  |  1.3 KB  |  85 lines

  1. ; Access SuperDuper Via Arexx Using Blitz Basic
  2. ;
  3. ; Written By C.Wilkinson 1994,1995
  4. ;
  5. ; Dynamic Designs
  6.  
  7. WBStartup
  8. NoCli
  9. WBenchToFront_
  10. WbToScreen 0
  11.  
  12. LoadFont 0,"",8
  13.  
  14. #RXCOMM=$1000000
  15. #RXFF_RESULT=$20000
  16. #RXFF_STRING=$40000
  17. If FindPort_("REXX")=0
  18. Err.l=EasyRequest(1,"Error","Can't Find Arexx"+Chr$(10)+"Please Run
  19. Rexxmast","Quit")
  20. End
  21. EndIf
  22.  
  23. If FindPort_("SUPERDUPER.1")=0
  24. Err.l=EasyRequest(1,"Error","Can't Find SuperDuper"+Chr$(10)+"Please Run
  25. SuperDuper","Quit")
  26. End
  27. EndIf
  28.  
  29. port.l=CreateMsgPort("SD_Arexx")
  30. msg.l=CreateRexxMsg(port,"","SD_Arexx")
  31. FindScreen 0
  32. ;CatchDosErrs
  33. If msg=0 Then DisplayBeep_0:End
  34.  
  35. .Statements
  36. Statement Exe{a$}
  37.   SHARED msg.l,port.l
  38. com$="ADDRESS 'SUPERDUPER' "+a$
  39. SendRexxCommand msg,com$,#RXCOMM|#RXFF_STRING|#RXFF_RESULT
  40. Repeat:Wait:rmsg.l=RexxEvent(port):Until IsRexxMsg(rmsg)
  41. End Statement
  42.  
  43.  
  44. Window 0,115,13,400,150,$1008|$6,"SuperDuper Arexx Support (c)
  45. C.Wilkinson",0,1
  46.  
  47. GTButton 0,0,10,10,110,12,"ShutDown SD",10
  48. GTButton 0,1,10,25,110,12,"Stop",10
  49. GTButton 0,2,10,40,110,12,"Read",10
  50.  
  51. AttachGTList 0,0
  52.  
  53. Repeat
  54. Ev.l=Event
  55.  
  56. Select GadgetHit
  57.  Case 0:Gosub Quit
  58.  Case 1: Gosub Stopped
  59.  Case 2: Gosub Reads
  60.  
  61.  ; Etc Etc Etc
  62. End Select
  63.  
  64. Until Ev=$200
  65.  
  66. CloseWindow 0
  67.  
  68. ;DeleteRexxMsg msg
  69. ;DeleteMsgPort_(port)
  70. End
  71. ;Gosub Quit
  72. Return
  73.  
  74. .Stopped
  75. Exe{"'Stop'"}
  76. Return
  77.  
  78. .Reads
  79. Exe{"'Read'"}
  80. Return
  81.  
  82. .Quit
  83. Exe{"'Quit'"}
  84. Return
  85.